{% extends 'base.html' %}
{% block content %}
    <h1>学生列表</h1><a href="{% url 'add_student' %}">添加学生</a>
    <table class='form-control'>
        <tr>
            <th>学号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>年龄</th>
            <th>班级</th>
            
        </tr>
        {% for student in students %}
        <tr>
            <td>{{ student.student_id }}</td>
            <td>{{ student.name }}</td>
            <td>{{ student.sex }}</td>
            <td>{{ student.age }}</td>
            <td>{{ student.Classes}}</td>
            
        </tr>
        {% empty %}
        <tr>
            <td colspan="6">该班级暂无学生信息</td>
        </tr>
        {% endfor %}
    </table>
    

    {% endblock %}